/// Calculates the sum of odd Fibonacci numbers less than the given threshold
///
/// # Parameters
/// - `threshold` - The upper limit for Fibonacci numbers
///
/// # Returns
/// Returns the sum of odd Fibonacci numbers less than the threshold
pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    let mut previous = 0;
    let mut current = 1;
    let mut sum = 0;

    // Generate Fibonacci numbers and sum the odd ones
    while current < threshold {
        if current % 2 != 0 {
            sum += current;
        }
        // Update Fibonacci numbers
        let next = previous + current;
        previous = current;
        current = next;
    }

    sum
}
